WOLF ROS2 tips
WOLF relies in ROS2 framework, which provides a seamless integration and user-friendly interface with the library. By leveraging ROS2, users can take advantage of its robust communication, modularity, and extensive ecosystem.
Note
Since WOLF is a C++ library, it does not have a dependency on ROS2. However, if the user does not want to use ROS2, it will require additional effort to design and develop the necessary user interface and communication mechanisms.
WOLF ROS2 Node
We provide a WOLF ROS2 node that serves as the main entry point for WOLF applications. This node is designed to be generic and can be used for most robotics projects without modification.
The only parameter of the node is the path to the root YAML file, which contains the configuration for the WOLF application. The node can be launched using a launch file or directly from the command line:
ros2 run wolf_ros2_node wolf_ros2_node yaml_file_path:=/path/to/config/file.yaml
The WOLF ROS2 node will perform the following tasks: 1. Load the necessary WOLF plugins and ROS2 packages based on the provided YAML configuration file. 2. Initialize the WOLF tree with the specified configuration. 3. Create the subscribers and publishers specified in the configuration file. 4. Start the ROS2 node.
For more information see the documentation ROS2 Node in the section developing and understanding WOLF.
Sensor Switcher
Along with the specified subscribers and publishers, the WOLF ROS2 node also includes a Sensor Switcher. The Sensor Switcher a functionality that allows the user to switch on/off the different sensors via 4 topics:
Topic:
enable_sensors, Message typeexample_interfaces::msg::String: Switches on one or more sensors specified as a list of sensor names separated by commas.Topic:
disable_sensors, Message typeexample_interfaces::msg::String: Switches off one or more sensors specified as a list of sensor names separated by commas.Topic:
enable_all_sensors, Message typestd_msgs::msg::Empty: Switches on all sensors.Topic:
disable_all_sensors, Message typestd_msgs::msg::Empty: Switches off all sensors.
Useful WOLF ROS2 publishers
You can find all the publishers by looking at each WOLF ROS2 package, but here are some useful ones (located at WOLF ROS2 Node package) that may be useful in most applications:
PublisherTf
Publishes the WOLF state as a TF transform following the ROS2 conventions (map frame --> odom frame --> baselink frame).
It publishes the localization transform (between map_frame and odom_frame) and, optionally, the odometry transform (between odom_frame and baselink frame).
PublisherGraph
Publishes the graph graph of the problem to be visualized in RVIZ2.
Three visualization_msgs::msg::MarkerArray messages are published:
trajectory contains a set of frame-like markers corresponding to each frame in the WOLF tree trajectory. If frames contain velocity it is displayed with an arrow.
factors conatins line markers corresponding to each factor in the WOLF tree. The line color corresponds to the type of factor and they are grouped in namespace according to the processor that created them.
landmarks contains markers corresponding to each landmark in the WOLF tree. The color of the markers corresponds to amount of factors that observes the landmarks.
All three messages also include a text marker with the id of the frame, factor or landmark, respectively. Colors, sizes and other parameters can be configured.
PublisherStateBlock
Publishes the WOLF state as a std_msgs::msg::Float64MultiArray message containing the values of a specific state block of a sensor. This may be useful for visualizing the state of calibration or tracking of sensor parameters such as camera intrinsics or IMU biases.